package com.example.administrator.myapplication.flexibility;

import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import com.example.administrator.myapplication.R;


public class flexibilityActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_felexibility);
        getFlexMainFragment();
    }

    public void getFlexMainFragment(){
        flexibility_main_Fragment flexMainFragment = new flexibility_main_Fragment();
        FragmentManager fm = this.getFragmentManager();            //设置fragment管理器
        FragmentTransaction ft = fm.beginTransaction();
        ft.replace(R.id.fragment_flex, flexMainFragment);      //替换当前的fragment
        ft.commit();
    }
}
